x86-64 is 15 bytes (including all prefixes, opcode,
ModRM, SIB, displacement, and immediate bytes).
This patch adjusts the MAX_INST_LEN to the correct
value. This should reduce the size of some variables
in the hypervisor code. This patch also does some
minor code clean-up in the vm exit handler for VMX.
Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
&& !(vector & INTR_INFO_VALID_MASK))
__hvm_bug(regs);
- vector &= 0xff;
+ vector &= INTR_INFO_VECTOR_MASK;
local_irq_disable();
TRACE_VMEXIT(1,vector);
return;
}
- {
- __vmread(GUEST_RIP, &eip);
- TRACE_VMEXIT(0,exit_reason);
- }
+ __vmread(GUEST_RIP, &eip);
+ TRACE_VMEXIT(0,exit_reason);
switch (exit_reason) {
case EXIT_REASON_EXCEPTION_NMI:
if ((error = __vmread(VM_EXIT_INTR_INFO, &vector))
|| !(vector & INTR_INFO_VALID_MASK))
__hvm_bug(®s);
- vector &= 0xff;
+ vector &= INTR_INFO_VECTOR_MASK;
TRACE_VMEXIT(1,vector);
perfc_incra(cause_vector, vector);
__u32 flags;
};
-#define MAX_INST_LEN 32
+#define MAX_INST_LEN 15 /* Maximum instruction length = 15 bytes */
struct mmio_op {
int flags;